Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

framer-motion

Package Overview
Dependencies
Maintainers
51
Versions
1163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framer-motion

A simple and powerful JavaScript animation library

  • 11.11.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6M
decreased by-0.54%
Maintainers
51
Weekly downloads
 
Created

What is framer-motion?

The framer-motion npm package is a popular library for creating animations and transitions in React applications. It provides a powerful and easy-to-use set of tools for animating components, handling gestures, and creating complex motion effects with simple declarative syntax.

What are framer-motion's main functionalities?

Basic Animations

Animate the horizontal position of a component to 100 pixels.

{"<motion.div animate={{ x: 100 }} />"}

Variants

Use variants to define animation states and transition between them.

{"<motion.div variants={variants} initial='hidden' animate='visible' />"}

Gestures

Scale a button up on hover and down on tap.

{"<motion.button whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }} />"}

Drag

Make a component draggable.

{"<motion.div drag />"}

Shared Layout Animations

Animate layout changes between components that share a layoutId.

{"<motion.ul layout><motion.li layoutId='id' /></motion.ul>"}

Exit Animations

Animate the component out when it's removed from the React tree.

{"<motion.div exit={{ opacity: 0 }} />"}

Other packages similar to framer-motion

Keywords

FAQs

Package last updated on 14 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc